package yhp.com.zijie.service.impl;

import yhp.com.zijie.bean.Student;
import yhp.com.zijie.dao.StudentDao;
import yhp.com.zijie.dao.impl.StudentDaoImpl;
import yhp.com.zijie.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao = new StudentDaoImpl();


    @Override
    public List<Student> getAllStudent(String stuname,String stuno ,int sex  , int pageIndex , int pageSize) {
        return studentDao.getAllStudent(stuname,stuno,sex , pageIndex , pageSize);
    }

    @Override
    public int total(String stuname, String stuno, int sex) {
        return studentDao.total(stuname,stuno,sex);
    }

    @Override
    public int addStudent(Student student) {
        return studentDao.addStudent(student);
    }

    @Override
    public Student findById(int stuId) {
        return studentDao.findById(stuId);
    }

    @Override
    public int deleteById(int stuId) {
        return studentDao.deleteById(stuId);
    }

    @Override
    public int updateStudent(Student student) {
        return studentDao.updateStudent(student);
    }
}
